﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using IB.Common.Base;
using IB.Common.Entities;
using IB.Paging;

namespace UIListNews
{
    public partial class ListNews : V_ListNewsBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (NewsID==-1)
                {
                    V_ListTypeBase nl = (V_ListTypeBase)Page.LoadControl(ControlPath + ListType);
                    nl.ParentLoad = this;
                    plhList.Controls.Add(nl);
                    mv.SetActiveView(vList);
                }
                else    
                {
                    V_ListTypeBase dl = (V_ListTypeBase)Page.LoadControl(ControlPath + "/NewsDetail.ascx");
                    dl.ParentLoad = this;
                    plhDetail.Controls.Add(dl);
                    mv.SetActiveView(vDetail);
                }
            }
        }
    }
}